package com.sex.bull.melancholy.service.mybatis.service;

import com.sex.bull.melancholy.service.mybatis.bean.OPHistory;
import com.sex.bull.melancholy.service.mybatis.dao.OPHistoryDao;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by LiM on 2017/8/24.
 */
@Service
public class OPHistoryService {

    @Autowired
    private OPHistoryDao opHistoryDao;

    /**
     * 查询数据
     * @param opHistory
     * @return
     * @throws Exception
     */
    public List<OPHistory> queryAllList(OPHistory opHistory) throws Exception{
        return opHistoryDao.queryAllList(opHistory);
    }

    /**
     * 新增数据
     * @param opHistory
     * @throws Exception
     */
    public void addData(OPHistory opHistory) throws Exception{
        opHistoryDao.addData(opHistory);
    }

    /**
     * 新增数据
     * @param opHistoryList
     * @throws Exception
     */
    public void addData(List<OPHistory> opHistoryList) throws Exception {
        opHistoryDao.addData(opHistoryList);
    }

    /**
     * 更新数据
     * @param opHistory
     * @throws Exception
     */
    public void updateData(OPHistory opHistory) throws Exception{
        opHistoryDao.updateData(opHistory);
    }

    /**
     * 逻辑删除数据
     * @param opHistory
     * @throws Exception
     */
    public void deleteData(OPHistory opHistory) throws Exception{
        opHistoryDao.deleteData(opHistory);
    }
}
